package com.bootlever.framework.common.utils;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class PropertyUtils {

    /**
     * 获取属性
     * @param url
     * @param key
     * @return
     * @throws IOException
     */
    public static String getProperty(String url, String key) throws IOException {
        InputStream in = PropertyUtils.class.getResourceAsStream(url);
        Properties p = new Properties();
        p.load(in);
        return p.getProperty(key);
    }
}
